﻿<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<c:set var="basePath" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML>
<html lang="zh-cn">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>编辑角色</title>
	<jsp:include page="/resources/inc/formHead.jsp" />
</head>
<body>
<form id="createForm" class="layui-form layui-form-pane" method="post">
	<div class="layui-form-item">
		<label class="layui-form-label" for="name">名称</label>
		<div class="layui-input-block">
			<input id="name" type="text" class="layui-input" name="name" value="${role.name}" lay-verify="required">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label" for="title">标题</label>
		<div class="layui-input-block">
			<input id="title" type="text" class="layui-input" name="title" value="${role.title}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label" for="description">描述</label>
		<div class="layui-input-block">
			<input id="description" type="text" class="layui-input" name="description"value="${role.description}" >
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label" for="description">数据权限</label>
		<div class="layui-input-block">
			<select name="dataScope" lay-verify="required">
				<option value="0" <c:if test="${role.dataScope==0}">selected</c:if>>按明细设置</option>
				<option value="1" <c:if test="${role.dataScope==1}">selected</c:if>>所有数据</option>
				<option value="3" <c:if test="${role.dataScope==3}">selected</c:if>>所在部门及以下数据</option>
				<option value="5" <c:if test="${role.dataScope==5}">selected</c:if>>所在部门数据</option>
				<option value="7" <c:if test="${role.dataScope==7}">selected</c:if>>仅本人数据</option>
			</select>
		</div>
	</div>

	<div class="layui-form-item">
		<div class="layui-input-block">
			<button class="layui-btn" lay-submit="" lay-filter="sub">立即提交</button>
			<button type="reset" class="layui-btn layui-btn-primary">重置</button>
		</div>
	</div>
</form>
<jsp:include page="/resources/inc/formFooter.jsp" />
<script>
	FormCommon.initForm({
		url: "${basePath}/manage/role/update/${role.roleId}"
	});
</script>
</body>
</html>